<?php

namespace App\Containers\AppSection\Settings\Actions;

use App\Containers\AppSection\Settings\Tasks\DeleteSettingTask;
use App\Containers\AppSection\Settings\Tasks\FindSettingByIdTask;
use App\Containers\AppSection\Settings\UI\API\Requests\DeleteSettingRequest;
use App\Ship\Parents\Actions\Action;

class DeleteSettingAction extends Action
{
    public function run(DeleteSettingRequest $data): void
    {
        $setting = app(FindSettingByIdTask::class)->run($data->id);
        app(DeleteSettingTask::class)->run($setting);
    }
}
